using CommunityServer.Components.SearchBarrel;
using CommunityServer.Components;

namespace FourRoads.Links
{
	/// <summary>
	/// Summary description for ResLinkBarrelItem.
	/// </summary>
	public class ResLinkBarrelItem: BarrelItem
	{
		public override void Format(IndexPost post)
		{
			ResLinkSection s = ResLinkSection.GetSection(post.SectionID);
			if (s != null)
			{
				post.Url = ResLinkUrls.Instance().ViewLink(post.SectionID , post.PostID);
				post.ApplicationUrl = ResLinkUrls.Instance().ViewSection(-1);
			}				
		}

		public override ApplicationType ApplicationType
		{
			get
			{
				return (ApplicationType)ExApplicationType.ResLink;
			}
		}
	}
}
